package 作业1;

import java.util.Scanner;
public class Code3 {
    public static void main(String[] args){
        System.out.println("请输入你想输入的字符串：");
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        int a=0;
        int b=0;
        int c=0;
        int i;
        for(i=0;i<s.length();i++){
            char ch=s.charAt(i);
            if(ch>='a'&&ch<='z'){
                a++;
            }else if(ch>='A'&&ch<='Z'){
                b++;
            }else if(ch>='0'&&ch<='9'){
                c++;
            }
        }
        System.out.println("小写字母的个数为"+a+"个");
        System.out.println("大写字母的个数为"+b+"个");
        System.out.println("数字的个数为"+c+"个");
    }
}
